import time,datetime
a = 10
t = time.time()
while 1:
    try:
        f=open('cpu.txt')
        s = f.read()
        f.close()
        xx = int(s)
    except:
        time.sleep(0.1)
        # print('err',time.time())
        continue
    if xx==0:
        time.sleep(1)
        continue
    while 1:
        a += 1
        if a>10000000:
            a=10
            print(a,time.time()-t,datetime.datetime.now())
            t=time.time()
            break